package atguigu.ScadaEquipCheckNodeInfoUtils;

import org.apache.commons.lang.StringUtils;

public class ScadaEquipCheckNodeInfo {
	
    private String equipmentNo;// 设备编码
    private String equipmentName;// 设备名称
    private String aCode;// A码
    private String checkNodeId; // 监测点编码
    private String sampleModel; // 机型
    private String checkNodeType;// 测点类别
    private String workLocation;// 工位

    public String getEquipmentName() {
        return equipmentName;
    }

    public void setEquipmentName(String equipmentName) {
        this.equipmentName = equipmentName;
    }

    public String getaCode() {
        return aCode;
    }

    public void setaCode(String aCode) {
        this.aCode = aCode;
    }

    public String getCheckNodeId() {
        return checkNodeId;
    }

    public void setCheckNodeId(String checkNodeId) {
        this.checkNodeId = checkNodeId;
    }

    public String getSampleModel() {
        return sampleModel;
    }

    public void setSampleModel(String sampleModel) {
        this.sampleModel = sampleModel;
    }

    public String getCheckNodeType() {
        return checkNodeType;
    }

    public void setCheckNodeType(String checkNodeType) {
        this.checkNodeType = checkNodeType;
    }

    public String getWorkLocation() {
        return workLocation;
    }

    public void setWorkLocation(String workLocation) {
        this.workLocation = workLocation;
    }

	
	public void initEquipmentNo(){
        if(StringUtils.isNotBlank(this.aCode) && StringUtils.isNotBlank(this.checkNodeId)){
            String aString = this.aCode;
            String string = this.checkNodeId;
            String substring = string.substring(string.length()-8,string.length());
//            System.out.println(substring);
            String substring2 = substring.substring(0,6);
//            System.out.println(substring2);
            String realString = "T"+aString+substring2;
//            System.out.println(realString);
            this.setEquipmentNo(realString);
        }
    }

	public String getEquipmentNo() {
		return equipmentNo;
	}

	public void setEquipmentNo(String equipmentNo) {
		this.equipmentNo = equipmentNo;
	}
    
	
	
    
}
